package com.itfreer.gis.service;

import java.util.List;

import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.itfreer.form.api.BaseRestService;
import com.itfreer.form.api.BaseService;
import com.itfreer.gis.entity.GisLayerConfigEntity;

/**
 * 定义地图图层配置接口服务
 */
@Component
@Path("/gislayerconfig/")
public class RestGisLayerConfigService extends BaseRestService<GisLayerConfigEntity> {
	
	@Autowired
	private GisLayerConfigService gisLayerConfigService;

	@Override
	protected BaseService<GisLayerConfigEntity> getService() {
		return gisLayerConfigService;
	}
	
	/**
	 * 获取实体
	 * @param guid			唯一值
	 * @return
	 */
	@POST
	@Path("/getLayerConfig/{id:.+}")
	@Produces(javax.ws.rs.core.MediaType.APPLICATION_JSON)
	public List<GisLayerConfigEntity> getLayerConfig(@PathParam("id") String regService){
		return gisLayerConfigService.getLayerConfig(regService);
	}
	
	@Override
	protected String getServiceName() {
		return "gislayerconfig";
	}
}